draw_text_warped, but the position is measured from a spot on the screen (ANCHOR_TOP_RIGHT, ANCHOR_CENTER, ...) instead of from the top-left corner, and it is fixed to the screen wherever you call it - a score that pops in the top-right corner stays in the top-right corner on any screen.
Works differently on Game Boy - The Game Boy cannot resize or turn letters, so a turned text keeps its letters upright and puts each 8 pixels of the line on the turn (24 letters at most, drawn with sprites); the size is not used.
Works differently on Game Boy Color - The Game Boy Color cannot resize or turn letters, so a turned text keeps its letters upright and puts each 8 pixels of the line on the turn (24 letters at most, drawn with sprites); the size is not used.
Sega Genesis: not available
On other consoles this differs: see Side by side and How the consoles differ.
draw_text_warped_anchored(anchor, x, y, text, xscale, yscale, angle)| Name | Type |
|---|---|
anchor | anchor |
x | real |
y | real |
text | string |
xscale | real |
yscale | real |
angle | real |
Nothing.
draw_text_warped, with the position measured from a named spot on the screen (an anchor) instead of from the top-left corner. It is for the same jobs - a score that pops, a warning that shakes - in a corner or an edge that should stay a corner or an edge whatever the screen size. The anchored call is fixed to the screen wherever you write it (a Step event, a script, any event), not only in a Draw GUI event.
After the anchor and the offset, the arguments are exactly draw_text_warped's own: the text, then xscale, yscale and angle (in degrees, 0 = east, turning counterclockwise). The point the anchor and offset land on is also the point the text grows and turns around.
text_align(ALIGN_RIGHT);
draw_text_warped_anchored(ANCHOR_TOP_RIGHT, -4, 8, "SCORE", 2, 2, 0);The word SCORE at double size in the top-right corner. Right-aligned text grows leftwards from its point, so even at double size it never pushes past the screen edge.
Exactly draw_text_warped in a Draw GUI event once the anchor is added to (x, y): one shared affine matrix for the whole string (the GBA has 32 in total), none at all for a call at scale 1 and angle 0, and the same front-most layer. If all 32 matrices are already in use elsewhere, the text still draws, just unwarped for that frame. The point the anchor and offset land on is also the point the text scales and turns around, after text_align() has picked which part of the text sits on it. The anchors sit where the screen’s own pixels say on the 240x160 screen - ANCHOR_TOP_RIGHT is (240, 0).